-
Notifications
You must be signed in to change notification settings - Fork 13
docs(js-sdk): add comprehensive sdk methods reference for issue #15 #106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
@CoolatMax is attempting to deploy a commit to the Reclaim Protocol Team on Vercel. A member of the Team first needs to authorize it. |
📝 WalkthroughWalkthroughAdds a new JavaScript SDK documentation page Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 6
🤖 Fix all issues with AI agents
In `@content/docs/js-sdk/sdk-methods.mdx`:
- Around line 12-17: Add missing detailed reference sections for
triggerReclaimFlow() and startSession(): document triggerReclaimFlow() as a
UI/session management method (what it opens, when to call it, return
values/promises, and side effects) and document startSession(sessionConfig,
callbacks) including explicit onSuccess(result) and onError(error) callback
parameter signatures, expected behaviors on ReclaimProofRequest
completion/failure, error handling strategies, and examples of how the SDK will
invoke these callbacks; also update the Methods Overview table to link to these
new sections so the table and detailed docs stay in sync.
- Around line 59-80: Remove the authoring/draft lines ("The Writing:", "This is
a 'Validation' method.", "Add this to your file:") so they don't appear in user
docs, and un-wrap the setParams() section by deleting the surrounding
```markdown ... ``` fence so the headings, table and descriptions render as
regular markdown; keep only the example code itself inside a proper
```javascript code block and ensure the setParams() heading and the parameter
table (including the `params` Record<string, string> row) remain as normal
markdown content associated with the setParams() documentation.
- Around line 56-58: The code block showing
reclaimProofRequest.setContext('user-wallet-address', 'session-id-12345'); is
missing its closing Markdown code fence; update the markdown around the example
(the line with reclaimProofRequest.setContext and the surrounding
triple-backtick opener) to add the closing ``` after the statement so the code
block is properly terminated and the following heading "The Writing:
setParams()" renders correctly.
- Around line 91-100: Close the unclosed JavaScript code block after the
setAppCallbackUrl example and remove the orphaned duplicate server-side snippet;
specifically, end the code fence immediately after
reclaimProofRequest.setAppCallbackUrl('https://my-backend.com/reclaim-webhook',
true) and delete the trailing duplicate ReclaimProofRequest.init(...) block
(references: reclaimProofRequest, setAppCallbackUrl, ReclaimProofRequest.init)
so the example is properly terminated and no incomplete/duplicated code remains.
- Around line 37-43: The MDX code block starting with the JavaScript example
that calls ReclaimProofRequest.init (the ReclaimProofRequest.init(...) snippet)
is missing a closing triple-backtick, causing the rest of the document to be
treated as code; fix by adding the closing ``` immediately after the example
(before the subsequent "## setContext()" heading) so the code fence is properly
terminated and MDX rendering succeeds.
- Line 8: The doc contains unsupported citation markers (e.g., [cite_start] and
[cite: 39, 40]) around the ReclaimProofRequest description that will render
literally; remove all occurrences of [cite_start] and [cite:] in this file
(including the malformed instances around "Your unique Application ID...",
"**Security Note:**...", "A unique identifier...", and "A message or
stringified...") or replace them with a supported citation pattern (e.g., plain
parenthetical references or markdown footnotes) consistently across the file;
alternatively, if you intend to keep citation syntax, add and configure a remark
plugin that processes these markers, but do not merge while the unsupported
markers remain.
Description
This PR addresses issue #15 by introducing a comprehensive SDK Methods Reference for the JavaScript SDK.
init(),setContext(),setParams(), andsetAppCallbackUrl().triggerReclaimFlow()andstartSession(), including callback handling foronSuccessandonError.Testing (ignore for documentation update)
npm run buildto ensure no broken tags or layout issues.npm run devto confirm the new page appears correctly in the sidebar and renders all tables as intended.Type of change
Checklist:
Additional Notes:
Attached are screenshots of the new documentation page rendered in the browser: